package com.liang.io;

import java.io.*;

public class BufferIoText {
    public static void main(String[] args) throws IOException {
        long start = System.currentTimeMillis();

        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("D:\\123\\123.wmv"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("D:\\itheima\\copy.wmv"));

        byte[] b = new byte[1024 * 8];
        int len;
        while ((len = bis.read(b)) != -1) {
            bos.write(b,0,len);
        }

        bos.close();
        bis.close();

        long end = System.currentTimeMillis();

        System.out.println(end-start);
    }
}
